/**********************************************
这是代码自动生成的，如果重新生成，所做的改动将会丢失
系统:Itop隐患排查
模块:系统平台
Itop.com 版权所有
生成者：Rabbit
生成时间:2012-1-6 11:53:51
***********************************************/

using System;
using System.Threading;
using System.ComponentModel;
namespace Itop.KSRY.Model
{
    /// <summary>
    ///[ksman]业务实体类
    ///对应表名:ksman
    /// </summary>
    [Serializable]
    public class ksman
    {
        
        #region Private 成员
        private string _id=Newid(); 
        private int _orderid=0; 
        private string _dwcode=String.Empty; 
        private string _dwname=String.Empty; 
        private string _xm=String.Empty; 
        private string _zw=String.Empty; 
        private int _nl=0; 
        private string _zy=String.Empty; 
        private int _jb=0; 
        private string _ksbz=String.Empty; 
        private string _remark=String.Empty; 
        private int _ksnum=0; 
        private int _lastbz=0;   
        #endregion
  
  
        #region Public 成员
   
        /// <summary>
        /// 属性名称：id
        /// 属性描述：
        /// 字段信息：[id],nvarchar
        /// </summary>
        [Browsable(false)]
        [DisplayNameAttribute("")]
        public string id
        {
            get { return _id; }
            set
            {			
                if(value==null)return;
                if( value.ToString().Length > 50)
                throw new Exception("[]长度不能大于50!");
                if (_id as object == null || !_id.Equals(value))
                {
                    _id = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：orderid
        /// 属性描述：序号
        /// 字段信息：[orderid],int
        /// </summary>
        [DisplayNameAttribute("序号")]
        public int orderid
        {
            get { return _orderid; }
            set
            {			
                if (_orderid as object == null || !_orderid.Equals(value))
                {
                    _orderid = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：dwcode
        /// 属性描述：单位代码
        /// 字段信息：[dwcode],nvarchar
        /// </summary>
        [DisplayNameAttribute("单位代码")]
        public string dwcode
        {
            get { return _dwcode; }
            set
            {			
                if(value==null)return;
                if( value.ToString().Length > 50)
                throw new Exception("[单位代码]长度不能大于50!");
                if (_dwcode as object == null || !_dwcode.Equals(value))
                {
                    _dwcode = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：dwname
        /// 属性描述：单位名称
        /// 字段信息：[dwname],nvarchar
        /// </summary>
        [DisplayNameAttribute("单位名称")]
        public string dwname
        {
            get { return _dwname; }
            set
            {			
                if(value==null)return;
                if( value.ToString().Length > 50)
                throw new Exception("[单位名称]长度不能大于50!");
                if (_dwname as object == null || !_dwname.Equals(value))
                {
                    _dwname = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：xm
        /// 属性描述：姓名
        /// 字段信息：[xm],nvarchar
        /// </summary>
        [DisplayNameAttribute("姓名")]
        public string xm
        {
            get { return _xm; }
            set
            {			
                if(value==null)return;
                if( value.ToString().Length > 50)
                throw new Exception("[姓名]长度不能大于50!");
                if (_xm as object == null || !_xm.Equals(value))
                {
                    _xm = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：zw
        /// 属性描述：职务
        /// 字段信息：[zw],nvarchar
        /// </summary>
        [DisplayNameAttribute("职务")]
        public string zw
        {
            get { return _zw; }
            set
            {			
                if(value==null)return;
                if( value.ToString().Length > 50)
                throw new Exception("[职务]长度不能大于50!");
                if (_zw as object == null || !_zw.Equals(value))
                {
                    _zw = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：nl
        /// 属性描述：年龄
        /// 字段信息：[nl],int
        /// </summary>
        [DisplayNameAttribute("年龄")]
        public int nl
        {
            get { return _nl; }
            set
            {			
                if (_nl as object == null || !_nl.Equals(value))
                {
                    _nl = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：zy
        /// 属性描述：专业
        /// 字段信息：[zy],nvarchar
        /// </summary>
        [DisplayNameAttribute("专业")]
        public string zy
        {
            get { return _zy; }
            set
            {			
                if(value==null)return;
                if( value.ToString().Length > 50)
                throw new Exception("[专业]长度不能大于50!");
                if (_zy as object == null || !_zy.Equals(value))
                {
                    _zy = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：jb
        /// 属性描述：级别
        /// 字段信息：[jb],int
        /// </summary>
        [DisplayNameAttribute("级别")]
        public int jb
        {
            get { return _jb; }
            set
            {			
                if (_jb as object == null || !_jb.Equals(value))
                {
                    _jb = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：ksbz
        /// 属性描述：抽考(是、否、空)
        /// 字段信息：[ksbz],nvarchar
        /// </summary>
        [DisplayNameAttribute("抽考")]
        public string ksbz
        {
            get { return _ksbz; }
            set
            {			
                if(value==null)return;
                if( value.ToString().Length > 5)
                throw new Exception("[抽考]长度不能大于5!");
                if (_ksbz as object == null || !_ksbz.Equals(value))
                {
                    _ksbz = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：remark
        /// 属性描述：备注
        /// 字段信息：[remark],nvarchar
        /// </summary>
        [DisplayNameAttribute("备注")]
        public string remark
        {
            get { return _remark; }
            set
            {			
                if(value==null)return;
                if( value.ToString().Length > 50)
                throw new Exception("[备注]长度不能大于50!");
                if (_remark as object == null || !_remark.Equals(value))
                {
                    _remark = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：ksnum
        /// 属性描述：
        /// 字段信息：[ksnum],int
        /// </summary>
        [Browsable(false)]
        [DisplayNameAttribute("抽考次数")]
        public int ksnum
        {
            get { return _ksnum; }
            set
            {			
                if (_ksnum as object == null || !_ksnum.Equals(value))
                {
                    _ksnum = value;
                }
            }			 
        }
  
        /// <summary>
        /// 属性名称：lastbz
        /// 属性描述：
        /// 字段信息：[lastbz],int
        /// </summary>
        /// 
        [Browsable(false)]
        [DisplayNameAttribute("上次抽考标志")]
        public int lastbz
        {
            get { return _lastbz; }
            set
            {			
                if (_lastbz as object == null || !_lastbz.Equals(value))
                {
                    _lastbz = value;
                }
            }			 
        }
  
        #endregion 
  
        #region 方法
        public static string Newid(){
            return DateTime.Now.ToString("yyyyMMddHHmmssffffff");
        }
        public string CreateID(){
            Thread.Sleep(new TimeSpan(100000));//0.1毫秒
            return DateTime.Now.ToString("yyyyMMddHHmmssffffff");
        }
        #endregion		
    }	
}
